import request from '@/utils/request'
import { useUserStore } from '@/stores'

// 用户注册
export const userRegisterService = ({ username, password, repassword }) =>
  request.post('/user/register', { username, password, repassword })

// 用户登录
export const userLoginService = ({ username, password }) =>
  request.post('/user/login', { username, password })

// 判断用户是否登录
export const userIsLogin = () => 
  request.get(`/user/exist/${localStorage.getItem('id')}`)

